﻿using EasyI18n.Api.Infrastructure.DataPersistence.DataEntityBases;
using EasyI18n.Api.Infrastructure.DataPersistence.MongoDb.Entities.Bases;
using MongoDB.Bson;

namespace EasyI18n.Api.Infrastructure.DataPersistence.MongoDb.Entities;

public class SystemUserLogin : IMongoDbEntity, IHasKey<ObjectId>, IHasCreator<ObjectId>, IHasUpdater<ObjectId>
{
    public SystemUserLogin()
    {
        this.InitPropertyValues();
    }

    public ObjectId Id { get; set; }

    /// <summary>
    /// Gets or sets the login provider for the login (e.g. facebook, google)
    /// </summary>
    public string LoginProvider { get; set; }

    /// <summary>
    /// Gets or sets the unique provider identifier for this login.
    /// </summary>
    public string ProviderKey { get; set; }

    /// <summary>
    /// Gets or sets the friendly name used in a UI for this login. 
    /// </summary>
    public string ProviderDisplayName { get; set; }

    /// <summary>
    /// Gets or sets the primary key of the user associated with this login.
    /// </summary>
    public ObjectId UserId { get; set; }

    /// <summary>
    /// Gets or sets the date and time, in UTC, when the login was created.
    /// </summary>
    public DateTime CreatedOn { get; set; }

    /// <summary>
    /// Gets or sets the date and time, in UTC, when the login was last updated.
    /// </summary>
    public DateTime? UpdatedOn { get; set; }

    /// <summary>
    /// Gets or sets the user id,  when the login was created.
    /// </summary>
    public ObjectId CreatedBy { get; set; }

    /// <summary>
    /// Gets or sets the user id, when the login was last updated.
    /// </summary>
    public ObjectId UpdatedBy { get; set; }
}